package com.jv.controller;

import com.jv.pojo.Users;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("service1")
public class WebController {
    @ResponseBody
    @RequestMapping("/setMsg")
    public String setMsg(HttpSession session, String msg) {
        session.setAttribute("msg",msg);
        return "ok";
    }
    @RequestMapping("/addUsers")
    @ResponseBody
    public String addUsers(HttpSession session, Users users) {
        session.setAttribute("u",users);
        return "ok";
    }

}
